const path = require("path");

module.exports = {
  runtimeCompiler: true,
  configureWebpack: {
    resolve: {
      alias: {
        "@": path.resolve(__dirname, "src"),
        style: path.resolve(__dirname, "src/style"),
      },
    },
  },
  devServer: {
    port: 8081,
    proxy: {
      "/api": {
        target: "http://localhost:8081",
        changeOrigin: true,
        pathRewrite: {
          "^/api": "/mock",
        },
      },
    },
  },
  css: {
    loaderOptions: {
      sass: {
        prependData: '@import "~@/style/variable.scss";',
      },
    },
  },
};
